package com.cskaoyan.service;

import com.cskaoyan.bean.MarketGoodsSpecification;
import com.cskaoyan.mapper.MarketGoodsSpecificationMapper;
import com.cskaoyan.util.TransactionUtil;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author stone
 * @date 2023/03/20 09:46
 */
public class SpecificationServiceImpl implements SpecificationService {
    @Override
    public int add(MarketGoodsSpecification specification) {
        MarketGoodsSpecificationMapper goodsSpecificationMapper = TransactionUtil.getMapper(MarketGoodsSpecificationMapper.class);
        Date now = new Date();
        specification.setAddTime(now);
        specification.setUpdateTime(now);
        return goodsSpecificationMapper.insertSelective(specification);
    }
}
